package com.duckygo.towerdefense;

import com.duckygo.towerdefense.game.GameSurfaceView;
import com.duckygo.towerdefense.game.scenes.SceneManager;
import com.duckygo.towerdefense.game.scenes.TowerDefenseScene;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class GameActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        requestWindowFeature(Window.FEATURE_NO_TITLE);  
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,   
                             WindowManager.LayoutParams.FLAG_FULLSCREEN);  

        
        
        SceneManager.setInstance(new TowerDefenseScene());
        
        setContentView(R.layout.game);
    }
    
    @Override
    protected void onResume() {
    	super.onResume();
    	
    	((GameSurfaceView)findViewById(R.id.gameView)).onResume();
    }
    
    @Override
    protected void onPause() {
    	super.onPause();
    	
    	((GameSurfaceView)findViewById(R.id.gameView)).onPause();
    }
}